<?php

/**
 * photo actions.
 *
 * @package    sfwixet
 * @subpackage photo
 * @author     Your name here
 * @version    SVN: $Id: actions.class.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
 */
class blogComponents extends sfComponents
{
 /**
  * Executes index action
  *
  * @param sfRequest $request A request object
  */
  public function executeIndex(sfWebRequest $request)
  {
  	
//$this->variable = "hola";
    //echo $request->getParameter("photo");
  }
  
  public function executeTitle(sfWebRequest $request)
  {
	$this->requestId = $request->getParameter("id",$this->getUser()->getId());
  	$this->myId = $this->getUser()->getId();
  	if($this->requestId != $this->myId){
  		$q = Doctrine_Query::create()
    		->update('Profile')
    		->set('visits', 'visits + 1')
    		->where('user_id = ?',array($this->requestId));
    	$q->execute();
  	}
  }
}
